<template>
  <div class="app-container">
    内容
  </div>
</template>

<script>
import kriging from 'kriging'
export default {
  data() {
    return {

    }
  },
  created() {
    this.getData()
  },
  methods: {
    getData() {
      // 离散点数据
      var data = [
        [1.33, 2.32, 0.069],
        [1.46, 2.74, 0.066],
        [1.29, 2.4, 0.065],
        [0.99, 2.0, 0.063],
        [1.5, 3.0, 0.06],
        [1.46, 3.27, 0.057],
        [0.97, 2.46, 0.056],
        [1.19, 2.86, 0.055],
        [0.96, 2.31, 0.054],
        [1.37, 2.72, 0.053]
      ]

      // 设置生成的网格大小
      var scope = {
        x: [0.5, 2.5],
        y: [1.5, 3.5]
      }

      // 生成网格
      var grid = new kriging.Grid(data, 'exponential', 100, scope.x, 100, scope.y)

      // 生成等高线图
      console.log(grid)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
